package itheima01;

/**
 * @author Xiao
 * @date 2021/7/17
 */
public class LambdaDemo05 {
    /*public static void main(String[] args) {
        userInter((double a, double b) -> {
            return a + b;
        });
    }*/
    public static void main(String[] args) {
        userInter((a, b) -> a + b);
    }

    public static void userInter(Inter i) {
        double sum = i.method(12.2, 12.3);
        System.out.println("sum:" + sum);
    }
}
interface Inter {
    //用于计算a + b 的结果并返回
    double method(double a, double b);
}